LEGION Simulator API Readme

Running a Simulation

Simulations run as before, but the return type from ISimulator::Step() has changed:
// Possible outcomes of a simulation step
typedef enum SimulationStepResult
{
	e_simStepOK,				// Simulation step successfully completed.
	e_simStepTimesUp,				// Simulation step successfully completed, reached the end of the
// runtime.
	e_simStepError,				// Simulation step suffered an error.
	e_simStepRefused_LicenceShutdown,		// Simulation step could not be processed because the licence
// requires the simulator instance be shut down.
// No further steps are possible until license issues are resolved.
	e_simStepRefused_NoLicenceManager,		// Simulation step could not be processed because the
// licence manager is unavailable.
	e_simStepRefused_NoProductLicence,		// Simulation step could not be processed because a licence for
// the running product is not available.
	e_simStepRefused_LicenceStairLimit,		// Simulation step could not be processed because the number of 
// stairs in the model exceeds the licenced limit.
	e_simStepRefused_LicenceEscalatorLimit,	// Simulation step could not be processed because the number of
// escalators in the model exceeds the licenced limit.
	e_simStepRefused_LicenceDelayPointLimit,	// Simulation step could not be processed because the number of
// delay points in the model exceeds the licenced limit.
} SimulationStepResult;

A Simulation can only proceed if ISimulator::Step() returns e_simStepOK. Simulation is complete when e_simStepTimesUp is returned. All other values indicate either a general or licensing error.

LEGION Simulator frequently validates its CONNECT licence whilst running. Therefore, changes in licence status may prematurely terminate running simulations.

Finally, please note that ISimulator::Step() may throw these exception types:

  • Legion::Exception::LicenceException ;
  • Legion::Exception::FileException ;
  • Legion::Exception::StandardException ;
  • std::exception ;
  • other generic exceptions.